import Missile
import pygame

image1=pygame.image.load("stone.bmp")
image1.set_colorkey((255,0,255))

class Stone(Missile.Missile):
	def __init__(self,x=0,y=0,mass=16.3804815,image=image1):
		Missile.Missile.__init__(self,x=x,y=y,mass=mass,image=image)
	def canClimb(self,it):
		return False
	def damageDealt(self,other):
		p=70
		print "baaah",p
		other.physicalDamageTaken(p)
		other.putInStun(30)
		self.reposition(other.x,other.y)
		self.coordDump()
		#return p,0
	def bumping(self):
		eps=2.5
		return not (-eps<self.x-self.prev_x<eps and -eps<self.y-self.prev_y<eps) 
		#return True
	def hitResult(self):
		self.cur_room.projectilesList.remove(self)
		#self.cur_room.collectablesList.append(self)
		self.cur_room.addAnotherCollectable(self)
	def postcondition(self):
		#eps=1
		if not (self.cur_room and self in self.cur_room.collectablesList) and self.y_bound:
			self.hitResult()